using UnityEngine;
using System.Collections;

public class KinectMenuItem : MonoBehaviour {
	
	public WWW path;
	
    public void Init(string imagePath) {
        StartCoroutine(Load(imagePath));
    }

    IEnumerator Load(string imagePath) {

        WWW req = new WWW("file://" + System.IO.Path.GetFullPath(imagePath).Replace('\\','/'));
        yield return req;
		
		path = req;
        transform.Find("KuutioImage").localScale = new Vector3(3.5f,1,3.5f);
        transform.Find("KuutioImage").renderer.material.mainTexture = req.texture;
    }
}